<template>
  <div id="e-table_1" style="width:100%;background-color: #42B983;">
  </div>
</template>

<script>
  var echarts = require('echarts');
  export default {
    data:()=>({

    }),
    mounted() {
      //不能在created中init
      var myChart = echarts.init(document.getElementById('e-table_1'));
      // 绘制图表
      myChart.setOption({
          title: {
              text: '柱形图例子'
          },
          tooltip: {},
          xAxis: {
              data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
          },
          yAxis: [
            // [5,10,15,20,25,30],
            // [0.15,0.3,0.45,0.6,0.75,0.9],
            {},
            {},
          ],
          series: [
            {
              name: '销量',
              type: 'bar',
              data: [5, 20, 36, 10, 10, 20],
              yAxisIndex:0,
            },
            {
              name: '比例',
              type: 'line',
              data: [0.2, 0.4, 0.5, 0.6, 0.5, 0.8],
              yAxisIndex:1,
            },
          ]
      });
    },
    created(){

    },
  }
</script>

<style>
</style>
